/<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>管理员界面</title>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"><!-- 导入bootstrap -->
<script src="https://code.jquery.com/jquery.js"></script><!-- 导入JQuery方便使用ajax插件 -->
<script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script><!-- 导入bootstrap核心js文件 -->
</head>
<body>
<nav class="navbar navbar-default navbar-static-top">
  <div class="container-fluid">
    <div class="navbar-header">
      <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>                        
      </button>
      <a id="a1" class="navbar-brand" style='padding-left:300px;color:red' href="/ProfessionalDesign/Managerlogin">亲，请登录</a>
    </div>
    <div class="collapse navbar-collapse" id="myNavbar">
      <ul class="nav navbar-nav" style="padding-left:100px">
        <li><a class="manage" href="/ProfessionalDesign/Manage?m_id=${managerinfo}">待处理</a></li>
        <li><a class="manage" href="/ProfessionalDesign/shopmanage?m_id=${managerinfo}">管理商铺</a></li>
        <li><a class="manage" href="/ProfessionalDesign/usermanage?m_id=${managerinfo}">用户管理</a></li>
        <li><a class="manage" href="/ProfessionalDesign/goodsmanage?m_id=${managerinfo}">商品管理</a></li>
        <li><a class="manage" href="/ProfessionalDesign/commentmanage?m_id=${managerinfo}">评论管理</a></li>
      </ul>
    </div>
  </div>
</nav>
 
<div class="container">
  <div class="row">
    <div class="col-sm-2">
      <h2>商品管理</h2>
    </div>
    <div class="col-sm-10">
      <h2>店铺商品</h2>
          <div class="row clearfix">
        <div class="col-md-12 column">
       		  <table class="table table-striped table-hover table-responsive-sm" style="width: 1000px;">
    <thead class="table-success">
      <tr>
        <th>商品编号</th>
        <th>类型</th>
        <th>商品名称</th>
        <th>商品图片</th>
        <th>商品库存</th>
        <th>商品价格</th>
        <th>状态</th>
        <th>操作</th>
      </tr>
    </thead>
    <tbody>
    <c:forEach var="good" items="${goodlist}">
      <tr>
        <td>${good.good_id}</td>
        <td>${good.type}</td>
        <td>${good.good_name}</td>
        <td><img src="${good.g_image}" class="img-thumbnail" width="50px" alt="Cinque Terre"></td>
        <td>${good.number}</td>
        <td>${good.price}</td>
        <c:if test="${good.issale==1}">
        <td>在售中</td>
        </c:if>
		 <c:if test="${good.issale==0}">
		 <td>禁售中</td>
		 </c:if>
        <td><a class="btn btn-primary btn-sm " href="/ProfessionalDesign/offShelf?goodid=${good.good_id}&m_id=${managerinfo}" >下架</a></td>
      </tr>
      </c:forEach>
    </tbody>
  </table>
        </div>
    </div>
    </div>
  </div>
</div>
 
<div class="jumbotron text-center" style="margin-top:100px;margin-bottom:0">
  <br>
  <p>© 2022 ProfessionalDesign.com 版权所有</p>
  <a>关于我们</a>|
  <a>合作伙伴</a>|
  <a>营销中心</a>|
  <a>联系客服</a>|
  <a>开放平台</a>|
  <a>诚征英才</a>|
  <a>联系我们</a>|
  <a>网站地图</a>|
  <a>法律声明及隐私权政策</a>
</div>
</body>
<style>

.navbar-default .navbar-brand:hover,
.navbar-default .navbar-brand:focus {
    color: red;
}
.navbar-default .navbar-nav>li>a:hover,
.navbar-default .navbar-nav>li>a:focus {
    color: red;
}

</style>
<script>
$(function(){
	if(${managerinfo}!=null){
		$('#a1').text('欢迎您，管理员编号' + ${managerinfo});
		}else{
			$("a").attr("href","${pageContext.request.contextPath}/Managerlogin");	
		}
})
</script>
</html>